<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">
<link href="style.css" type="text/css" rel="stylesheet">
<title>PACKUSDW—Pack with Unsigned Saturation </title></head>
<body>
<h1>PACKUSDW—Pack with Unsigned Saturation</h1>
<table>
<tr>
<th>Opcode/Instruction</th>
<th>Op /En</th>
<th>64/32 bit Mode Support</th>
<th>CPUID Feature Flag</th>
<th>Description</th></tr>
<tr>
<td>
<p>66 0F 38 2B /r</p>
<p>PACKUSDW <em>xmm1, xmm2/m128</em></p></td>
<td>RM</td>
<td>V/V</td>
<td>SSE4_1</td>
<td>Convert 4 packed signed doubleword integers from <em>xmm1 </em>and 4 packed signed doubleword integers from <em>xmm2/m128 </em>into 8 packed unsigned word integers in <em>xmm1</em> using unsigned saturation.</td></tr>
<tr>
<td>
<p>VEX.NDS.128.66.0F38 2B /r</p>
<p>VPACKUSDW <em>xmm1,xmm2, xmm3/m128</em></p></td>
<td>RVM</td>
<td>V/V</td>
<td>AVX</td>
<td>Convert 4 packed signed doubleword integers from <em>xmm2 </em>and 4 packed signed doubleword integers from <em>xmm3/m128 </em>into 8 packed unsigned word integers in <em>xmm1</em> using unsigned saturation.</td></tr>
<tr>
<td>
<p>VEX.NDS.256.66.0F38 2B /r</p>
<p>VPACKUSDW <em>ymm1, ymm2, ymm3/m256</em></p></td>
<td>RVM</td>
<td>V/V</td>
<td>AVX2</td>
<td>Convert 8 packed signed doubleword integers from <em>ymm2 </em>and 8 packed signed doubleword integers from <em>ymm3/m256 </em>into 16 packed unsigned word integers in <em>ymm1</em> using unsigned saturation.</td></tr>
<tr>
<td>
<p>EVEX.NDS.128.66.0F38.W0 2B /r</p>
<p>VPACKUSDW <em>xmm1{k1}{z}, xmm2, xmm3/m128/m32bcst</em></p></td>
<td>FV</td>
<td>V/V</td>
<td>
<p>AVX512VL</p>
<p>AVX512BW</p></td>
<td>Convert packed signed doubleword integers from xmm2 and packed signed doubleword integers from xmm3/m128/m32bcst into packed unsigned word integers in xmm1 using unsigned saturation under writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDS.256.66.0F38.W0 2B /r</p>
<p>VPACKUSDW <em>ymm1{k1}{z}, ymm2, ymm3/m256/m32bcst</em></p></td>
<td>FV</td>
<td>V/V</td>
<td>
<p>AVX512VL</p>
<p>AVX512BW</p></td>
<td>Convert packed signed doubleword integers from ymm2 and packed signed doubleword integers from ymm3/m256/m32bcst into packed unsigned word integers in ymm1 using unsigned saturation under writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDS.512.66.0F38.W0 2B /r</p>
<p>VPACKUSDW <em>zmm1{k1}{z}, zmm2, zmm3/m512/m32bcst</em></p></td>
<td>FV</td>
<td>V/V</td>
<td>AVX512BW</td>
<td>Convert packed signed doubleword integers from <em>zmm2 </em>and packed signed doubleword integers from <em>zmm3/m512/m32bcst </em>into packed unsigned word integers in<em> zmm1</em> using unsigned saturation under writemask k1.</td></tr></table>
<h3>Instruction Operand Encoding</h3>
<table>
<tr>
<td>Op/En</td>
<td>Operand 1</td>
<td>Operand 2</td>
<td>Operand 3</td>
<td>Operand 4</td></tr>
<tr>
<td>RM</td>
<td>ModRM:reg (r, w)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td>
<td>NA</td></tr>
<tr>
<td>RVM</td>
<td>ModRM:reg (w)</td>
<td>VEX.vvvv (r)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td></tr>
<tr>
<td>FV</td>
<td>ModRM:reg (w)</td>
<td>EVEX.vvvv (r)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td></tr></table>
<p><strong>Description</strong></p>
<p>Converts packed signed doubleword integers in the first and second source operands into packed unsigned word integers using unsigned saturation to handle overflow conditions. If the signed doubleword value is beyond the range of an unsigned word (that is, greater than FFFFH or less than 0000H), the saturated unsigned word integer value of FFFFH or 0000H, respectively, is stored in the destination.</p>
<p>EVEX encoded versions: The first source operand is a ZMM/YMM/XMM register. The second source operand is a ZMM/YMM/XMM register, a 512/256/128-bit memory location, or a 512/256/128-bit vector broadcasted from a 32-bit memory location. The destination operand is a ZMM register, updated conditionally under the writemask k1.</p>
<p>VEX.256 encoded version: The first source operand is a YMM register. The second source operand is a YMM register or a 256-bit memory location. The destination operand is a YMM register. The upper bits (MAX_VL-1:256) of the corresponding ZMM register destination are zeroed.</p>
<p>VEX.128 encoded version: The first source operand is an XMM register. The second source operand is an XMM register or 128-bit memory location. The destination operand is an XMM register. The upper bits (MAX_VL-1:128) of the corresponding ZMM register destination are zeroed.</p>
<p>128-bit Legacy SSE version: The first source operand is an XMM register. The second operand can be an XMM register or an 128-bit memory location. The destination is not distinct from the first source XMM register and the upper bits (MAX_VL-1:128) of the corresponding destination register destination are unmodified.</p>
<p><strong>Operation</strong></p>
<p><strong>PACKUSDW (Legacy SSE instruction)</strong></p>
<p>TMP[15:0] (cid:197) (DEST[31:0] &lt; 0) ? 0 : DEST[15:0];</p>
<p>DEST[15:0] (cid:197) (DEST[31:0] &gt; FFFFH) ? FFFFH : TMP[15:0] ;</p>
<p>TMP[31:16] (cid:197) (DEST[63:32] &lt; 0) ? 0 : DEST[47:32];</p>
<p>DEST[31:16] (cid:197) (DEST[63:32] &gt; FFFFH) ? FFFFH : TMP[31:16] ;</p>
<p>TMP[47:32] (cid:197) (DEST[95:64] &lt; 0) ? 0 : DEST[79:64];</p>
<p>DEST[47:32] (cid:197) (DEST[95:64] &gt; FFFFH) ? FFFFH : TMP[47:32] ;</p>
<p>TMP[63:48] (cid:197) (DEST[127:96] &lt; 0) ? 0 : DEST[111:96];</p>
<p>DEST[63:48] (cid:197) (DEST[127:96] &gt; FFFFH) ? FFFFH : TMP[63:48] ;</p>
<p>TMP[79:64] (cid:197) (SRC[31:0] &lt; 0) ? 0 : SRC[15:0];</p>
<p>DEST[79:64] (cid:197) (SRC[31:0] &gt; FFFFH) ? FFFFH : TMP[79:64] ;</p>
<p>TMP[95:80] (cid:197) (SRC[63:32] &lt; 0) ? 0 : SRC[47:32];</p>
<p>DEST[95:80] (cid:197) (SRC[63:32] &gt; FFFFH) ? FFFFH : TMP[95:80] ;</p>
<p>TMP[111:96] (cid:197) (SRC[95:64] &lt; 0) ? 0 : SRC[79:64];</p>
<p>DEST[111:96] (cid:197) (SRC[95:64] &gt; FFFFH) ? FFFFH : TMP[111:96] ;</p>
<p>TMP[127:112] (cid:197) (SRC[127:96] &lt; 0) ? 0 : SRC[111:96];</p>
<p>DEST[127:112] (cid:197) (SRC[127:96] &gt; FFFFH) ? FFFFH : TMP[127:112] ;</p>
<p>DEST[MAX_VL-1:128] (Unmodified)</p>
<p><strong>PACKUSDW (VEX.128 encoded version)</strong></p>
<p>TMP[15:0] (cid:197) (SRC1[31:0] &lt; 0) ? 0 : SRC1[15:0];</p>
<p>DEST[15:0] (cid:197) (SRC1[31:0] &gt; FFFFH) ? FFFFH : TMP[15:0] ;</p>
<p>TMP[31:16] (cid:197) (SRC1[63:32] &lt; 0) ? 0 : SRC1[47:32];</p>
<p>DEST[31:16] (cid:197) (SRC1[63:32] &gt; FFFFH) ? FFFFH : TMP[31:16] ;</p>
<p>TMP[47:32] (cid:197) (SRC1[95:64] &lt; 0) ? 0 : SRC1[79:64];</p>
<p>DEST[47:32] (cid:197) (SRC1[95:64] &gt; FFFFH) ? FFFFH : TMP[47:32] ;</p>
<p>TMP[63:48] (cid:197) (SRC1[127:96] &lt; 0) ? 0 : SRC1[111:96];</p>
<p>DEST[63:48] (cid:197) (SRC1[127:96] &gt; FFFFH) ? FFFFH : TMP[63:48] ;</p>
<p>TMP[79:64] (cid:197) (SRC2[31:0] &lt; 0) ? 0 : SRC2[15:0];</p>
<p>DEST[79:64] (cid:197) (SRC2[31:0] &gt; FFFFH) ? FFFFH : TMP[79:64] ;</p>
<p>TMP[95:80] (cid:197) (SRC2[63:32] &lt; 0) ? 0 : SRC2[47:32];</p>
<p>DEST[95:80] (cid:197) (SRC2[63:32] &gt; FFFFH) ? FFFFH : TMP[95:80] ;</p>
<p>TMP[111:96] (cid:197) (SRC2[95:64] &lt; 0) ? 0 : SRC2[79:64];</p>
<p>DEST[111:96] (cid:197) (SRC2[95:64] &gt; FFFFH) ? FFFFH : TMP[111:96] ;</p>
<p>TMP[127:112] (cid:197) (SRC2[127:96] &lt; 0) ? 0 : SRC2[111:96];</p>
<p>DEST[127:112] (cid:197) (SRC2[127:96] &gt; FFFFH) ? FFFFH : TMP[127:112];</p>
<p>DEST[MAX_VL-1:128] (cid:197) 0;</p>
<p><strong>VPACKUSDW (VEX.256 encoded version)</strong></p>
<p>TMP[15:0] (cid:197) (SRC1[31:0] &lt; 0) ? 0 : SRC1[15:0];</p>
<p>DEST[15:0] (cid:197) (SRC1[31:0] &gt; FFFFH) ? FFFFH : TMP[15:0] ;</p>
<p>TMP[31:16] (cid:197) (SRC1[63:32] &lt; 0) ? 0 : SRC1[47:32];</p>
<p>DEST[31:16] (cid:197) (SRC1[63:32] &gt; FFFFH) ? FFFFH : TMP[31:16] ;</p>
<p>TMP[47:32] (cid:197) (SRC1[95:64] &lt; 0) ? 0 : SRC1[79:64];</p>
<p>DEST[47:32] (cid:197) (SRC1[95:64] &gt; FFFFH) ? FFFFH : TMP[47:32] ;</p>
<p>TMP[63:48] (cid:197) (SRC1[127:96] &lt; 0) ? 0 : SRC1[111:96];</p>
<p>DEST[63:48] (cid:197) (SRC1[127:96] &gt; FFFFH) ? FFFFH : TMP[63:48] ;</p>
<p>TMP[79:64] (cid:197) (SRC2[31:0] &lt; 0) ? 0 : SRC2[15:0];</p>
<p>DEST[79:64] (cid:197) (SRC2[31:0] &gt; FFFFH) ? FFFFH : TMP[79:64] ;</p>
<p>TMP[95:80] (cid:197) (SRC2[63:32] &lt; 0) ? 0 : SRC2[47:32];</p>
<p>DEST[95:80] (cid:197) (SRC2[63:32] &gt; FFFFH) ? FFFFH : TMP[95:80] ;</p>
<p>TMP[111:96] (cid:197) (SRC2[95:64] &lt; 0) ? 0 : SRC2[79:64];</p>
<p>DEST[111:96] (cid:197) (SRC2[95:64] &gt; FFFFH) ? FFFFH : TMP[111:96] ;</p>
<p>TMP[127:112] (cid:197) (SRC2[127:96] &lt; 0) ? 0 : SRC2[111:96];</p>
<p>DEST[127:112] (cid:197) (SRC2[127:96] &gt; FFFFH) ? FFFFH : TMP[127:112] ;</p>
<p>TMP[143:128] (cid:197) (SRC1[159:128] &lt; 0) ? 0 : SRC1[143:128];</p>
<p>DEST[143:128] (cid:197) (SRC1[159:128] &gt; FFFFH) ? FFFFH : TMP[143:128] ;</p>
<p>TMP[159:144] (cid:197) (SRC1[191:160] &lt; 0) ? 0 : SRC1[175:160];</p>
<p>DEST[159:144] (cid:197) (SRC1[191:160] &gt; FFFFH) ? FFFFH : TMP[159:144] ;</p>
<p>TMP[175:160] (cid:197) (SRC1[223:192] &lt; 0) ? 0 : SRC1[207:192];</p>
<p>DEST[175:160] (cid:197) (SRC1[223:192] &gt; FFFFH) ? FFFFH : TMP[175:160] ;</p>
<p>TMP[191:176] (cid:197) (SRC1[255:224] &lt; 0) ? 0 : SRC1[239:224];</p>
<p>DEST[191:176] (cid:197) (SRC1[255:224] &gt; FFFFH) ? FFFFH : TMP[191:176] ;</p>
<p>TMP[207:192] (cid:197) (SRC2[159:128] &lt; 0) ? 0 : SRC2[143:128];</p>
<p>DEST[207:192] (cid:197) (SRC2[159:128] &gt; FFFFH) ? FFFFH : TMP[207:192] ;</p>
<p>TMP[223:208] (cid:197) (SRC2[191:160] &lt; 0) ? 0 : SRC2[175:160];</p>
<p>DEST[223:208] (cid:197) (SRC2[191:160] &gt; FFFFH) ? FFFFH : TMP[223:208] ;</p>
<p>TMP[239:224] (cid:197) (SRC2[223:192] &lt; 0) ? 0 : SRC2[207:192];</p>
<p>DEST[239:224] (cid:197) (SRC2[223:192] &gt; FFFFH) ? FFFFH : TMP[239:224] ;</p>
<p>TMP[255:240] (cid:197) (SRC2[255:224] &lt; 0) ? 0 : SRC2[239:224];</p>
<p>DEST[255:240] (cid:197) (SRC2[255:224] &gt; FFFFH) ? FFFFH : TMP[255:240] ;</p>
<p>DEST[MAX_VL-1:256] (cid:197) 0;</p>
<p><strong>VPACKUSDW (EVEX encoded versions)</strong></p>
<p>(KL, VL) = (8, 128), (16, 256), (32, 512)</p>
<p>FOR j (cid:197) 0 TO ((KL/2) - 1)</p>
<p>i (cid:197) j * 32</p>
<p>IF (EVEX.b == 1) AND (SRC2 *is memory*)</p>
<p>THEN</p>
<p>TMP_SRC2[i+31:i] (cid:197) SRC2[31:0]</p>
<p>ELSE</p>
<p>TMP_SRC2[i+31:i] (cid:197) SRC2[i+31:i]</p>
<p>FI;</p>
<p>ENDFOR;</p>
<p>TMP[15:0] (cid:197) (SRC1[31:0] &lt; 0) ? 0 : SRC1[15:0];</p>
<p>DEST[15:0] (cid:197) (SRC1[31:0] &gt; FFFFH) ? FFFFH : TMP[15:0] ;</p>
<p>TMP[31:16] (cid:197) (SRC1[63:32] &lt; 0) ? 0 : SRC1[47:32];</p>
<p>DEST[31:16] (cid:197) (SRC1[63:32] &gt; FFFFH) ? FFFFH : TMP[31:16] ;</p>
<p>TMP[47:32] (cid:197) (SRC1[95:64] &lt; 0) ? 0 : SRC1[79:64];</p>
<p>DEST[47:32] (cid:197) (SRC1[95:64] &gt; FFFFH) ? FFFFH : TMP[47:32] ;</p>
<p>TMP[63:48] (cid:197) (SRC1[127:96] &lt; 0) ? 0 : SRC1[111:96];</p>
<p>DEST[63:48] (cid:197) (SRC1[127:96] &gt; FFFFH) ? FFFFH : TMP[63:48] ;</p>
<p>TMP[79:64] (cid:197) (TMP_SRC2[31:0] &lt; 0) ? 0 : TMP_SRC2[15:0];</p>
<p>DEST[79:64] (cid:197) (TMP_SRC2[31:0] &gt; FFFFH) ? FFFFH : TMP[79:64] ;</p>
<p>TMP[95:80] (cid:197) (TMP_SRC2[63:32] &lt; 0) ? 0 : TMP_SRC2[47:32];</p>
<p>DEST[95:80] (cid:197) (TMP_SRC2[63:32] &gt; FFFFH) ? FFFFH : TMP[95:80] ;</p>
<p>TMP[111:96] (cid:197) (TMP_SRC2[95:64] &lt; 0) ? 0 : TMP_SRC2[79:64];</p>
<p>DEST[111:96] (cid:197) (TMP_SRC2[95:64] &gt; FFFFH) ? FFFFH : TMP[111:96] ;</p>
<p>TMP[127:112] (cid:197) (TMP_SRC2[127:96] &lt; 0) ? 0 : TMP_SRC2[111:96];</p>
<p>DEST[127:112] (cid:197) (TMP_SRC2[127:96] &gt; FFFFH) ? FFFFH : TMP[127:112] ;</p>
<p>IF VL &gt;= 256</p>
<p>TMP[143:128] (cid:197) (SRC1[159:128] &lt; 0) ? 0 : SRC1[143:128];</p>
<p>DEST[143:128] (cid:197) (SRC1[159:128] &gt; FFFFH) ? FFFFH : TMP[143:128] ;</p>
<p>TMP[159:144] (cid:197) (SRC1[191:160] &lt; 0) ? 0 : SRC1[175:160];</p>
<p>DEST[159:144] (cid:197) (SRC1[191:160] &gt; FFFFH) ? FFFFH : TMP[159:144] ;</p>
<p>TMP[175:160] (cid:197) (SRC1[223:192] &lt; 0) ? 0 : SRC1[207:192];</p>
<p>DEST[175:160] (cid:197) (SRC1[223:192] &gt; FFFFH) ? FFFFH : TMP[175:160] ;</p>
<p>TMP[191:176] (cid:197) (SRC1[255:224] &lt; 0) ? 0 : SRC1[239:224];</p>
<p>DEST[191:176] (cid:197) (SRC1[255:224] &gt; FFFFH) ? FFFFH : TMP[191:176] ;</p>
<p>TMP[207:192] (cid:197) (TMP_SRC2[159:128] &lt; 0) ? 0 : TMP_SRC2[143:128];</p>
<p>DEST[207:192] (cid:197) (TMP_SRC2[159:128] &gt; FFFFH) ? FFFFH : TMP[207:192] ;</p>
<p>TMP[223:208] (cid:197) (TMP_SRC2[191:160] &lt; 0) ? 0 : TMP_SRC2[175:160];</p>
<p>DEST[223:208] (cid:197) (TMP_SRC2[191:160] &gt; FFFFH) ? FFFFH : TMP[223:208] ;</p>
<p>TMP[239:224] (cid:197) (TMP_SRC2[223:192] &lt; 0) ? 0 : TMP_SRC2[207:192];</p>
<p>DEST[239:224] (cid:197) (TMP_SRC2[223:192] &gt; FFFFH) ? FFFFH : TMP[239:224] ;</p>
<p>TMP[255:240] (cid:197) (TMP_SRC2[255:224] &lt; 0) ? 0 : TMP_SRC2[239:224];</p>
<p>DEST[255:240] (cid:197) (TMP_SRC2[255:224] &gt; FFFFH) ? FFFFH : TMP[255:240] ;</p>
<p>FI;</p>
<p>IF VL &gt;= 512</p>
<p>TMP[271:256] (cid:197) (SRC1[287:256] &lt; 0) ? 0 : SRC1[271:256];</p>
<p>DEST[271:256] (cid:197) (SRC1[287:256] &gt; FFFFH) ? FFFFH : TMP[271:256] ;</p>
<p>TMP[287:272] (cid:197) (SRC1[319:288] &lt; 0) ? 0 : SRC1[303:288];</p>
<p>DEST[287:272] (cid:197) (SRC1[319:288] &gt; FFFFH) ? FFFFH : TMP[287:272] ;</p>
<p>TMP[303:288] (cid:197) (SRC1[351:320] &lt; 0) ? 0 : SRC1[335:320];</p>
<p>DEST[303:288] (cid:197) (SRC1[351:320] &gt; FFFFH) ? FFFFH : TMP[303:288] ;</p>
<p>TMP[319:304] (cid:197) (SRC1[383:352] &lt; 0) ? 0 : SRC1[367:352];</p>
<p>DEST[319:304] (cid:197) (SRC1[383:352] &gt; FFFFH) ? FFFFH : TMP[319:304] ;</p>
<p>TMP[335:320] (cid:197) (TMP_SRC2[287:256] &lt; 0) ? 0 : TMP_SRC2[271:256];</p>
<p>DEST[335:304] (cid:197) (TMP_SRC2[287:256] &gt; FFFFH) ? FFFFH : TMP[79:64] ;</p>
<p>TMP[351:336] (cid:197) (TMP_SRC2[319:288] &lt; 0) ? 0 : TMP_SRC2[303:288];</p>
<p>DEST[351:336] (cid:197) (TMP_SRC2[319:288] &gt; FFFFH) ? FFFFH : TMP[351:336] ;</p>
<p>TMP[367:352] (cid:197) (TMP_SRC2[351:320] &lt; 0) ? 0 : TMP_SRC2[315:320];</p>
<p>DEST[367:352] (cid:197) (TMP_SRC2[351:320] &gt; FFFFH) ? FFFFH : TMP[367:352] ;</p>
<p>TMP[383:368] (cid:197) (TMP_SRC2[383:352] &lt; 0) ? 0 : TMP_SRC2[367:352];</p>
<p>DEST[383:368] (cid:197) (TMP_SRC2[383:352] &gt; FFFFH) ? FFFFH : TMP[383:368] ;</p>
<p>TMP[399:384] (cid:197) (SRC1[415:384] &lt; 0) ? 0 : SRC1[399:384];</p>
<p>DEST[399:384] (cid:197) (SRC1[415:384] &gt; FFFFH) ? FFFFH : TMP[399:384] ;</p>
<p>TMP[415:400] (cid:197) (SRC1[447:416] &lt; 0) ? 0 : SRC1[431:416];</p>
<p>DEST[415:400] (cid:197) (SRC1[447:416] &gt; FFFFH) ? FFFFH : TMP[415:400] ;</p>
<p>TMP[431:416] (cid:197) (SRC1[479:448] &lt; 0) ? 0 : SRC1[463:448];</p>
<p>DEST[431:416] (cid:197) (SRC1[479:448] &gt; FFFFH) ? FFFFH : TMP[431:416] ;</p>
<p>TMP[447:432] (cid:197) (SRC1[511:480] &lt; 0) ? 0 : SRC1[495:480];</p>
<p>DEST[447:432] (cid:197) (SRC1[511:480] &gt; FFFFH) ? FFFFH : TMP[447:432] ;</p>
<p>TMP[463:448] (cid:197) (TMP_SRC2[415:384] &lt; 0) ? 0 : TMP_SRC2[399:384];</p>
<p>DEST[463:448] (cid:197) (TMP_SRC2[415:384] &gt; FFFFH) ? FFFFH : TMP[463:448] ;</p>
<p>TMP[475:464] (cid:197) (TMP_SRC2[447:416] &lt; 0) ? 0 : TMP_SRC2[431:416];</p>
<p>DEST[475:464] (cid:197) (TMP_SRC2[447:416] &gt; FFFFH) ? FFFFH : TMP[475:464] ;</p>
<p>TMP[491:476] (cid:197) (TMP_SRC2[479:448] &lt; 0) ? 0 : TMP_SRC2[463:448];</p>
<p>DEST[491:476] (cid:197) (TMP_SRC2[479:448] &gt; FFFFH) ? FFFFH : TMP[491:476] ;</p>
<p>TMP[511:492] (cid:197) (TMP_SRC2[511:480] &lt; 0) ? 0 : TMP_SRC2[495:480];</p>
<p>DEST[511:492] (cid:197) (TMP_SRC2[511:480] &gt; FFFFH) ? FFFFH : TMP[511:492] ;</p>
<p>FI;</p>
<p>FOR j (cid:197) 0 TO KL-1</p>
<p>i (cid:197) j * 16</p>
<p>IF k1[j] OR *no writemask*</p>
<p>THEN</p>
<p>DEST[i+15:i] (cid:197) TMP_DEST[i+15:i]</p>
<p>ELSE</p>
<p>IF *merging-masking*</p>
<p>; merging-masking</p>
<p>THEN *DEST[i+15:i] remains unchanged*</p>
<p>ELSE *zeroing-masking*</p>
<p>; zeroing-masking</p>
<p>DEST[i+15:i] (cid:197) 0</p>
<p>FI</p>
<p>FI;</p>
<p>ENDFOR;</p>
<p>DEST[MAX_VL-1:VL] (cid:197) 0</p>
<p><strong>Intel C/C++ Compiler Intrinsic Equivalents</strong></p>
<p>VPACKUSDW__m512i _mm512_packus_epi32(__m512i m1, __m512i m2);</p>
<p>VPACKUSDW__m512i _mm512_mask_packus_epi32(__m512i s, __mmask32 k, __m512i m1, __m512i m2);</p>
<p>VPACKUSDW__m512i _mm512_maskz_packus_epi32( __mmask32 k, __m512i m1, __m512i m2);</p>
<p>VPACKUSDW__m256i _mm256_mask_packus_epi32( __m256i s, __mmask16 k, __m256i m1, __m256i m2);</p>
<p>VPACKUSDW__m256i _mm256_maskz_packus_epi32( __mmask16 k, __m256i m1, __m256i m2);</p>
<p>VPACKUSDW__m128i _mm_mask_packus_epi32( __m128i s, __mmask8 k, __m128i m1, __m128i m2);</p>
<p>VPACKUSDW__m128i _mm_maskz_packus_epi32( __mmask8 k, __m128i m1, __m128i m2);</p>
<p>PACKUSDW__m128i _mm_packus_epi32(__m128i m1, __m128i m2);</p>
<p>VPACKUSDW__m256i _mm256_packus_epi32(__m256i m1, __m256i m2);</p>
<p><strong>SIMD Floating-Point Exceptions</strong></p>
<p>None</p>
<p><strong>Other Exceptions</strong></p>
<p>Non-EVEX-encoded instruction, see Exceptions Type 4.</p>
<p>EVEX-encoded instruction, see Exceptions Type E4NF.</p></body></html>